--- /dev/null
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+# Check if filename argument is provided
+if (@ARGV != 1) {
+ print "perl script.pl yourfile.txt > output.txt\n";
+ exit 1;
+}
+
+my $filename = $ARGV[0];
+
+# Read the entire file
+open(my $fh, '<', $filename) or die "Cannot open file '$filename': $!\n";
+my $content = do { local $/; <$fh> };
+close($fh);
+
+# Replace <i> with <em>
+$content =~ s/<i>/<em>/g;
+$content =~ s/<\/i>/<\/em>/g;
+
+# Replace <b> with <strong>
+$content =~ s/<b>/<strong>/g;
+$content =~ s/<\/b>/<\/strong>/g;
+
+# Delete <div...> opening tags only (keep content, delete closing tags)
+$content =~ s/<div[^>]*>//g;
+
+# Delete remaining </div> tags (in case there are unmatched ones)
+$content =~ s/<\/div>//g;
+
+# Delete <center> and </center> tags
+$content =~ s/<center>//g;
+$content =~ s/<\/center>//g;
+
+# Replace <a href="#notes">*</a> with just the asterisks
+$content =~ s/<a href="#notes">(\*+)<\/a>/$1/g;
+
+# Replace multiple whitespaces with single space
+$content =~ s/\s+/ /g;
+
+# Put everything on a single line (remove newlines)
+$content =~ s/\n/ /g;
+
+# Trim leading and trailing whitespace
+$content =~ s/^\s+|\s+$//g;
+
+# Print the result
+print $content . "\n";
\ No newline at end of file